/**********************************************************************************************************************
 *
 * Project:    mGameEngine
 * File:       multitexturedmaterial.h
 * Author:     karooolek
 * Created on: 2009-03-24
 *
 **********************************************************************************************************************/

#ifndef MULTITEXTUREDMATERIAL_H_
#define MULTITEXTUREDMATERIAL_H_

#include "texturedmaterial.h"

namespace mGameEngine
{
namespace Graphics
{

/**
 * Multi-textured material.
 */
class MultiTexturedMaterial : public TexturedMaterial
{
protected:
    /**
     * Normal map.
     */
    const Texture *_normalMap;

    /**
     * Specular map.
     */
    const Texture *_specMap;

public:
    /**
     * Create new multi-textured material from normal map, texture and colors.
     * @param texture texture
     * @param normalMap normal map
     * @param specMap specular map
     * @param ambient ambient color
     * @param diffuse diffuse color
     * @param specular specular color
     * @param shininess shininess
     * @param emissive emissive color
      */
    MultiTexturedMaterial(const Texture *texture = NULL,
            const Texture *normalMap = NULL,
            const Texture *specMap = NULL,
            const Color & ambient = Color(1.0f, 1.0f, 1.0f),
            const Color & diffuse = Color(1.0f, 1.0f, 1.0f),
            const Color & specular = Color(1.0f, 1.0f, 1.0f),
            float shininess = 1.0f,
            const Color & emissive = Color(0.0f, 0.0f, 0.0f));

    /**
     * Destroy multi-textured material.
     */
    virtual ~MultiTexturedMaterial();

    /**
     * Get material normal map.
     * @return material normal map
     */
    const Texture *getNormalMap() const
    {
        return _normalMap;
    }

    /**
     * Set material normal map.
     * @param normalMap normal map
     */
    void setNormalMap(const Texture *normalMap)
    {
        _normalMap = normalMap;
    }

    /**
     * Get material specular map.
     * @return material specular map
     */
    const Texture *getSpecularMap() const
    {
        return _specMap;
    }

    /**
     * Set material specular map.
     * @param specMap specular map
     */
    void setSpecularMap(const Texture *specMap)
    {
        _specMap = specMap;
    }

    /**
     * Set multi-textured material as active.
     */
    virtual void set() const;
};

}
}

#endif // MULTITEXTUREDMATERIAL_H_
